<?xml version="1.0" encoding="CP850"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta content="text/html; charset=CP850" http-equiv="Content-Type" />

  <title>Class: TexTest</title>

  <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />

  <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
  <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
  <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
  <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>

</head>
<body id="top" class="class">

  <div id="metadata">
    <div id="home-metadata">
      <div id="home-section" class="section">
        <h3 class="section-header">
          <a href="./index.html">Home</a>
          <a href="./index.html#classes">Classes</a>
          <a href="./index.html#methods">Methods</a>
        </h3>
      </div>
    </div>

    <div id="file-metadata">
      <div id="file-list-section" class="section">
        <h3 class="section-header">In Files</h3>
        <div class="section-body">
          <ul>
          
            <li><a href="./test/tex_test_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
              class="thickbox" title="test/tex_test.rb">test/tex_test.rb</a></li>
          
          </ul>
        </div>
      </div>

      
    </div>

    <div id="class-metadata">
      
      <!-- Parent Class -->
      <div id="parent-class-section" class="section">
        <h3 class="section-header">Parent</h3>
        
        <p class="link">Test::Unit::TestCase</p>
        
      </div>
      

      

      

      
      <!-- Method Quickref -->
      <div id="method-list-section" class="section">
        <h3 class="section-header">Methods</h3>
        <ul class="link-list">
          
          <li><a href="#method-i-test_escape_char">#test_escape_char</a></li>
          
          <li><a href="#method-i-test_longtable">#test_longtable</a></li>
          
        </ul>
      </div>
      

      
    </div>

    <div id="project-metadata">
      
      
      <div id="fileindex-section" class="section project-section">
        <h3 class="section-header">Files</h3>
        <ul>
        
          <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
        
          <li class="file"><a href="./README.html">README</a></li>
        
          <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
        
          <li class="file"><a href="./nbproject/private/rake-d_txt.html">rake-d.txt</a></li>
        
        </ul>
      </div>
      

      <div id="classindex-section" class="section project-section">
        <h3 class="section-header">Class/Module Index
          <span class="search-toggle"><img src="./images/find.png"
            height="16" width="16" alt="[+]"
            title="show/hide quicksearch" /></span></h3>
        <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
        <fieldset>
          <legend>Quicksearch</legend>
          <input type="text" name="quicksearch" value=""
            class="quicksearch-field" />
        </fieldset>
        </form>

        <ul class="link-list">
        
          <li><a href="./Tex.html">Tex</a></li>
        
          <li><a href="./TexTest.html">TexTest</a></li>
        
        </ul>
        <div id="no-class-search-results" style="display: none;">No matching classes.</div>
      </div>

      
    </div>
  </div>

  <div id="documentation">
    <h1 class="class">TexTest</h1>

    <div id="description" class="description">
      
    </div><!-- description -->

    
    <div id="5Buntitled-5D" class="documentation-section">
      

      

      

      

      <!-- Methods -->
      
      <div id="public-instance-method-details" class="method-section section">
        <h3 class="section-header">Public Instance Methods</h3>

      
        <div id="test_escape_char-method" class="method-detail ">
          <a name="method-i-test_escape_char"></a>

          
          <div class="method-heading">
            <span class="method-name">test_escape_char</span><span
              class="method-args">()</span>
            <span class="method-click-advice">click to toggle source</span>
          </div>
          

          <div class="method-description">
            
            
            

            
            <div class="method-source-code" id="test_escape_char-source">
<pre>
<span class="ruby-comment"># File test/tex_test.rb, line 147</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_escape_char</span>
  <span class="ruby-identifier">a</span> = <span class="ruby-constant">Tex</span>.<span class="ruby-identifier">new</span>()
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-node">&quot;\\$ \\_ \\% \\&amp; \\# \\~ \\\\&quot;</span>, <span class="ruby-identifier">a</span>.<span class="ruby-identifier">escape_char</span>(<span class="ruby-string">'$ _ % &amp; # ~ \'</span>))
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-node">&quot;\\$ \\_\\_ \\% \\&amp; \\# \\~ \\\\&quot;</span>, <span class="ruby-identifier">a</span>.<span class="ruby-identifier">escape_char</span>(<span class="ruby-string">'$ __ % &amp; # ~ \'</span>))
<span class="ruby-keyword">end</span></pre>
            </div><!-- test_escape_char-source -->
            
          </div>

          

          
        </div><!-- test_escape_char-method -->

      
        <div id="test_longtable-method" class="method-detail ">
          <a name="method-i-test_longtable"></a>

          
          <div class="method-heading">
            <span class="method-name">test_longtable</span><span
              class="method-args">()</span>
            <span class="method-click-advice">click to toggle source</span>
          </div>
          

          <div class="method-description">
            
            
            

            
            <div class="method-source-code" id="test_longtable-source">
<pre>
<span class="ruby-comment"># File test/tex_test.rb, line 7</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_longtable</span>

  <span class="ruby-comment"># Variables</span>
  <span class="ruby-identifier">caption</span>     = <span class="ruby-string">&quot;This text will appear above the table&quot;</span>
  <span class="ruby-identifier">caption_toc</span> = <span class="ruby-string">&quot;This text will appear in the table of contents&quot;</span>
  <span class="ruby-identifier">label</span>       = <span class="ruby-string">&quot;Tab001&quot;</span>
  <span class="ruby-identifier">header</span>      = [<span class="ruby-string">'Spalte 1'</span>, <span class="ruby-string">'Spalte 2'</span>, <span class="ruby-string">'Spalte 3'</span>]
  <span class="ruby-identifier">data</span>        = [[<span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-value">3</span>], [<span class="ruby-value">4</span>, <span class="ruby-string">''</span>, <span class="ruby-value">5</span>], [<span class="ruby-value">6</span>, <span class="ruby-value">7</span>, <span class="ruby-value">8</span>]]
  <span class="ruby-identifier">col_def</span>     = [<span class="ruby-string">'c'</span>, <span class="ruby-string">'c'</span>, <span class="ruby-string">'c'</span>]

  <span class="ruby-comment"># Instance of Tex-Object</span>
  <span class="ruby-identifier">tbl</span> = <span class="ruby-constant">Tex</span>.<span class="ruby-identifier">new</span>()

  <span class="ruby-comment"># Exception if :label not given</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-comment">#label: label,</span>
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-identifier">col_def</span>,
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :caption not given</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-comment">#caption: caption,</span>
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-identifier">col_def</span>,
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :col_def not given</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-comment">#col_def: col_def,</span>
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :header not given</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-identifier">col_def</span>,
                              <span class="ruby-comment">#header: header,</span>
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :header not given</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-identifier">col_def</span>,
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-comment">#data: data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :header not an Array</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({
                                 <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                                 <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                                 <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-identifier">col_def</span>,
                                 <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-string">'header'</span>,
                                 <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :data not an Array</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-identifier">col_def</span>,
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-string">'data'</span>
                             })
  )

  <span class="ruby-comment"># Exception if :col_def not an Array</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> <span class="ruby-string">'col_def'</span>,
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if amount of columns in :col_def ist not equal with columns in :header</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> [<span class="ruby-string">'c'</span>, <span class="ruby-string">'c'</span>],
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :caption_toc ist not an String</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption_toc</span><span class="ruby-operator">:</span> <span class="ruby-value">2</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> [<span class="ruby-string">'c'</span>, <span class="ruby-string">'c'</span>],
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :label ist not an String</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-value">2</span>,
                              <span class="ruby-identifier">caption_toc</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption_toc</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> [<span class="ruby-string">'c'</span>, <span class="ruby-string">'c'</span>],
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

  <span class="ruby-comment"># Exception if :caption ist not an String</span>
  <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">tbl</span>.<span class="ruby-identifier">longtable</span>({<span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">label</span>,
                              <span class="ruby-identifier">caption_toc</span><span class="ruby-operator">:</span> <span class="ruby-identifier">caption_toc</span>,
                              <span class="ruby-identifier">caption</span><span class="ruby-operator">:</span> <span class="ruby-value">2</span>,
                              <span class="ruby-identifier">col_def</span><span class="ruby-operator">:</span> [<span class="ruby-string">'c'</span>, <span class="ruby-string">'c'</span>],
                              <span class="ruby-identifier">header</span><span class="ruby-operator">:</span> <span class="ruby-identifier">header</span>,
                              <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>
                             })
  )

<span class="ruby-keyword">end</span></pre>
            </div><!-- test_longtable-source -->
            
          </div>

          

          
        </div><!-- test_longtable-method -->

      
      </div><!-- public-instance-method-details -->
    
    </div><!-- 5Buntitled-5D -->
  

  </div><!-- documentation -->

  <div id="validator-badges">
    <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
    <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
      Rdoc Generator</a> 2</small>.</p>
  </div>

</body>
</html>

